<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>合并问题</title>
    <style>
        .box1 {
            width: 200px;
            height: 200px;
            background-color: orange;
            /*两个边距会合并，两个边距的较大值,左右也会有合并问题，这个问题不用解决，上下商量好距离就行，解决办法副作用太大*/
            margin-bottom: 50px;
        }

        .box2 {
            width: 200px;
            height: 200px;
            background-color: skyblue;
            margin-top: 50px;

        }
    </style>
</head>
<body>
<img src="../../images/margin合并问题.png">
    <div class="box1">box1</div>
    <div class="box2">box2</div>
</body>
</html>